package net.xiduth.game.player.content.tasks; 
  
import net.xiduth.Settings;
import net.xiduth.game.Graphics;
import net.xiduth.game.player.Player;
  
/** 
 *  
 * @author Xiles 
 * 
 */
public class Congrats { 
      
    public static int CongratsBoard = 1230; 
   
    public static void sendCongratsBoard(Player player) { 
        if (player.ToggleSystem == true) { 
        	player.getInterfaceManager().sendInterface(CongratsBoard);
        	player.getPackets().sendIComponentText(CongratsBoard, 2, "Congrats on completing a weekly tasks!");
        	player.getPackets().sendIComponentText(CongratsBoard, 3, "If you haven't yet completed the other tasks "
        			+ "then go to it! No time waiting around!");
        	player.getPackets().sendIComponentText(CongratsBoard, 4, "If you feel like donating, click the link below"
        			+ " we can always use the extra help!");
        	player.lock();
        	player.setNextGraphics(new Graphics(1765));	
        }
    }
    public static void sendDonating(Player player) {
        	player.getPackets().sendOpenURL(Settings.DONATE_LINK);
        	player.unlock();
        }
    public static void sendLeaving(Player player) {
        	player.closeInterfaces();
        	player.unlock();
        }
    public static void handleButtons(Player player, int componentId) { 
        if (componentId == 12) {   
              sendDonating(player); 
              } 
        if (componentId == 19) {   
              sendLeaving(player); 
              } 
    }
}